package com.example.annotation;

import com.example.annotation.util.OnePrint;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

/**
 * 功能: 注解测试类
 *
 * @author : zhouzhaodong
 * @version : 1.0
 * @date : 2021/6/28 16:30
 */
@RestController
public class AnnotationController {

    @GetMapping("/testAnnotation")
    @OnePrint
    public Object testAnnotation(String message){
        System.out.println(message);
        Map<String, Object> map = new HashMap<>();
        map.put("message", message);
        map.put("newMessage", "one" + message);
        return map;
    }

}
